﻿@model IEnumerable<DotNetUniLodz.Models.Article>

@{
    ViewBag.Title = "FromCategory";
}

<h2>FromCategory</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Article_title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Article_text)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.User_author)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Article_creationDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Article_lastMod)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Category_id)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Event_id)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Article_img)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Article_title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Article_text)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User_author)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Article_creationDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Article_lastMod)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Category_id)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Event_id)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Article_img)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Article_id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Article_id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Article_id })
        </td>
    </tr>
}

</table>
